package com.example.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.domain.ResponseResult;
import com.example.domain.entity.Article;
import com.example.exception.FloraException;

import java.util.List;
import java.util.Map;

public interface ArticleService extends IService<Article> {

    IPage<Article> getArticlePage(Map<String, Object> condition, Integer pageNum, Integer pageSize);

    void updateArticleViewCount(Long id);

    IPage<Article> getDraftPage(Long userId, Integer pageNum, Integer pageSize);

    void updateArticle(Article article) throws FloraException;

    Article addArticle(Article article) throws FloraException;

    void deleteArticle(Long id) throws FloraException;

    void updateLikeCount(Long articleId) throws FloraException;

    List<Article> getLatestBaikeArticle();

    List<Article> getBrowseList();

    List<Article> getArticleByPlantCategoryId(Long id);

    Article getArticleById(Long id);
}
